﻿<UserControl x:Class="IndexMarkSilverlightClient.Views.Controls.ReportsControls.IndexListDoc"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:sharedcontrols="clr-namespace:SharedCode.Controls;assembly=SharedCode"    
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:clases="clr-namespace:IndexMarkSilverlightClient.Classes"
             xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
             xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
             mc:Ignorable="d"
    d:DesignHeight="271" d:DesignWidth="686">


    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="25"/>
            <RowDefinition Height="12*"/>
        </Grid.RowDefinitions>



        <StackPanel Orientation="Horizontal" Grid.Row="0" VerticalAlignment="Center" Margin="0" UseLayoutRounding="False">
            <TextBlock Text="Фильтр по фамилии: " Margin="2,2,2,2" VerticalAlignment="Center"/>
            <TextBox Width="150" Margin="2,2,2,2" TextChanged="TextBox_TextChanged" VerticalAlignment="Center"/>
            <TextBlock Text=" Группировать по:" Margin="2,2,2,2" VerticalAlignment="Center"/>
            <CheckBox Content="факультетам" Checked="CheckBox_Checked" Unchecked="CheckBox_Checked"  Margin="2,2,2,2" VerticalAlignment="Center"/>
            <CheckBox Content="кафедрам"  Checked="CheckBox_Checked_1" Unchecked="CheckBox_Checked_1" Margin="2,2,2,2" VerticalAlignment="Center"/>
            <CheckBox Content="должностям" Checked="CheckBox_Checked_2" Unchecked="CheckBox_Checked_2" Margin="2,2,2,2" VerticalAlignment="Center"/>
            <Button Content="Экспорт в Excel" Click="Button_Click" Margin="2,2,2,2"/>
        </StackPanel>
        
        <clases:xDataGrid Grid.Row="1" IsReadOnly="True" ItemsSource="{Binding}" AutoGenerateColumns="False" x:Name="IndexGrid" LoadingRowGroup="IndexGrid_LoadingRowGroup" SelectionMode="Single">
            <clases:xDataGrid.Columns>
                <data:DataGridTextColumn Header="№" Binding="{Binding OrderField}" />
                <!--<data: Header="ФИО" Binding="{Binding Resp.Person}"/>-->
                <data:DataGridTextColumn Header="ФИО" Binding="{Binding Resp}" />
                <data:DataGridTextColumn Header="Кафедра" Binding="{Binding Resp.Department.Abbriviation}"/>
                <data:DataGridTextColumn Header="Должность" Binding="{Binding Position}"/>
                <data:DataGridTextColumn Header="Раздел 3" Binding="{Binding R3}"/>
                <data:DataGridTextColumn Header="Раздел 4" Binding="{Binding R4}"/>
                <data:DataGridTextColumn Header="Категория" Binding="{Binding Kat}"/>
            </clases:xDataGrid.Columns>
        </clases:xDataGrid>
        
        <sharedcontrols:LoadingBar x:Name="loadingBar" VerticalAlignment="Center"
                                   Action="загрузка" HorizontalAlignment="Center" Grid.RowSpan="3"/>
    </Grid>
</UserControl>
